#!/usr/bin/env python
# coding: utf-8

# In[1]:


import numpy as np


# In[7]:


X = np.array([[1.2,1.5,1.8],
             [1.3,1.4,.19],
             [1.1,1.6,1.7]])
Y = np.array([5,10,9]).T


# In[4]:


X


# In[5]:


Y


# In[8]:


Z = np.dot(X,Y)
Z


# In[9]:


np.random.seed(1)
H = np.random.randint(1,10,size = 30)
H


# In[12]:


H= H.reshape(-1,3)


# In[13]:


H


# In[14]:


H[:,2]


# In[15]:


H[:,2]<=3


# In[16]:


H[:,2][H[:,2]<=3]=0


# In[17]:


H


# In[18]:


H[:,2][(H[:,2]>3)&(H[:,2]<=6)]=1


# In[19]:


H


# In[20]:


H[:,2][H[:,2]>6]=2


# In[21]:


H


# In[22]:


F_train = H[:,2]
F_train


# In[23]:


H_train = H[:,0:2]


# In[24]:


H_train


# In[25]:


H_train0 = H_train[F_train == 0]
H_train0


# In[26]:


H_train1 = H_train[F_train == 1]
H_train2 = H_train[F_train == 2]


# In[27]:


H_train1


# In[28]:


H_train2


# In[ ]:




